\hypertarget{classShipCAD_1_1ViewportViewPerspective}{}\section{Ship\+C\+AD\+:\+:Viewport\+View\+Perspective Class Reference}
\label{classShipCAD_1_1ViewportViewPerspective}\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}


calculate view, world matrices and operations for a Perspective viewport  




{\ttfamily \#include $<$viewportview.\+h$>$}

Inheritance diagram for Ship\+C\+AD\+:\+:Viewport\+View\+Perspective\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classShipCAD_1_1ViewportViewPerspective}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classShipCAD_1_1ViewportViewPerspective_a670a0691b0d02fadd13bf210026efcf1}{Viewport\+View\+Perspective} (\hyperlink{classShipCAD_1_1Viewport}{Viewport} $\ast$vp)
\item 
virtual \hyperlink{classShipCAD_1_1ViewportViewPerspective_a3424a48490558e39959161ee9b5da692}{$\sim$\+Viewport\+View\+Perspective} ()
\item 
virtual void \hyperlink{classShipCAD_1_1ViewportViewPerspective_af96ca2b448d261206e360b1304510a65}{initialize\+Viewport} (const Q\+Vector3D \&min, const Q\+Vector3D \&max, int width, int height)
\item 
virtual void \hyperlink{classShipCAD_1_1ViewportViewPerspective_ab3cc69a6cdb3271cc9e79ec16aa37a33}{reset\+View} ()
\item 
float \hyperlink{classShipCAD_1_1ViewportViewPerspective_a6d48a61a324740874979d599352bef82}{get\+Angle} () const 
\item 
void \hyperlink{classShipCAD_1_1ViewportViewPerspective_ad6d853a15bc9015d43e4c052471f2cb1}{set\+Angle} (float val)
\item 
float \hyperlink{classShipCAD_1_1ViewportViewPerspective_a4baad3b4ab5a1f3fb7fd2dfa9ac49952}{get\+Elevation} () const 
\item 
void \hyperlink{classShipCAD_1_1ViewportViewPerspective_ad09e4532f81905f9ea90545b0b6d4856}{set\+Elevation} (float val)
\item 
\hyperlink{namespaceShipCAD_a58f51ebd2e66de5e41c2ffd6f434241e}{camera\+\_\+type\+\_\+t} \hyperlink{classShipCAD_1_1ViewportViewPerspective_a76e1128fb2031c44b4d04eecbeace739}{get\+Camera\+Type} () const 
\item 
void \hyperlink{classShipCAD_1_1ViewportViewPerspective_ab1a56bd7cb986e2c3163bcacd201d32d}{set\+Camera\+Type} (\hyperlink{namespaceShipCAD_a58f51ebd2e66de5e41c2ffd6f434241e}{camera\+\_\+type\+\_\+t} val)
\item 
virtual Q\+Vector2D \hyperlink{classShipCAD_1_1ViewportViewPerspective_afc402aace76462bb3b0431cebba6a6a5}{project\+To3D} (Q\+Point pos, int w, int h)
\begin{DoxyCompactList}\small\item\em convert screen coordinates to 2D world coordinates \end{DoxyCompactList}\item 
virtual bool \hyperlink{classShipCAD_1_1ViewportViewPerspective_a1de2fd402609b54c79c2d70390ba4a64}{middle\+Mouse\+Move} (Q\+Point cur, Q\+Point prev, int w, int h)
\item 
virtual bool \hyperlink{classShipCAD_1_1ViewportViewPerspective_a11f5f04a95646a701743804c4d7c1d10}{left\+Mouse\+Move} (Q\+Point cur, Q\+Point prev, int w, int h)
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
calculate view, world matrices and operations for a Perspective viewport 

Definition at line 144 of file viewportview.\+h.



\subsection{Constructor \& Destructor Documentation}
\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!Viewport\+View\+Perspective@{Viewport\+View\+Perspective}}
\index{Viewport\+View\+Perspective@{Viewport\+View\+Perspective}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{Viewport\+View\+Perspective(\+Viewport $\ast$vp)}{ViewportViewPerspective(Viewport *vp)}}]{\setlength{\rightskip}{0pt plus 5cm}Viewport\+View\+Perspective\+::\+Viewport\+View\+Perspective (
\begin{DoxyParamCaption}
\item[{{\bf Viewport} $\ast$}]{vp}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [explicit]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a670a0691b0d02fadd13bf210026efcf1}{}\label{classShipCAD_1_1ViewportViewPerspective_a670a0691b0d02fadd13bf210026efcf1}


Definition at line 174 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!````~Viewport\+View\+Perspective@{$\sim$\+Viewport\+View\+Perspective}}
\index{````~Viewport\+View\+Perspective@{$\sim$\+Viewport\+View\+Perspective}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{$\sim$\+Viewport\+View\+Perspective()}{~ViewportViewPerspective()}}]{\setlength{\rightskip}{0pt plus 5cm}virtual Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::$\sim$\+Viewport\+View\+Perspective (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a3424a48490558e39959161ee9b5da692}{}\label{classShipCAD_1_1ViewportViewPerspective_a3424a48490558e39959161ee9b5da692}


Definition at line 149 of file viewportview.\+h.



\subsection{Member Function Documentation}
\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!get\+Angle@{get\+Angle}}
\index{get\+Angle@{get\+Angle}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{get\+Angle() const }{getAngle() const }}]{\setlength{\rightskip}{0pt plus 5cm}float Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::get\+Angle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a6d48a61a324740874979d599352bef82}{}\label{classShipCAD_1_1ViewportViewPerspective_a6d48a61a324740874979d599352bef82}


Definition at line 154 of file viewportview.\+h.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!get\+Camera\+Type@{get\+Camera\+Type}}
\index{get\+Camera\+Type@{get\+Camera\+Type}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{get\+Camera\+Type() const }{getCameraType() const }}]{\setlength{\rightskip}{0pt plus 5cm}{\bf camera\+\_\+type\+\_\+t} Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::get\+Camera\+Type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a76e1128fb2031c44b4d04eecbeace739}{}\label{classShipCAD_1_1ViewportViewPerspective_a76e1128fb2031c44b4d04eecbeace739}


Definition at line 162 of file viewportview.\+h.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!get\+Elevation@{get\+Elevation}}
\index{get\+Elevation@{get\+Elevation}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{get\+Elevation() const }{getElevation() const }}]{\setlength{\rightskip}{0pt plus 5cm}float Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::get\+Elevation (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a4baad3b4ab5a1f3fb7fd2dfa9ac49952}{}\label{classShipCAD_1_1ViewportViewPerspective_a4baad3b4ab5a1f3fb7fd2dfa9ac49952}


Definition at line 158 of file viewportview.\+h.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!initialize\+Viewport@{initialize\+Viewport}}
\index{initialize\+Viewport@{initialize\+Viewport}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{initialize\+Viewport(const Q\+Vector3\+D \&min, const Q\+Vector3\+D \&max, int width, int height)}{initializeViewport(const QVector3D &min, const QVector3D &max, int width, int height)}}]{\setlength{\rightskip}{0pt plus 5cm}void Viewport\+View\+Perspective\+::initialize\+Viewport (
\begin{DoxyParamCaption}
\item[{const Q\+Vector3D \&}]{min, }
\item[{const Q\+Vector3D \&}]{max, }
\item[{int}]{width, }
\item[{int}]{height}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_af96ca2b448d261206e360b1304510a65}{}\label{classShipCAD_1_1ViewportViewPerspective_af96ca2b448d261206e360b1304510a65}


Implements \hyperlink{classShipCAD_1_1ViewportView_ad1c89a6e34b7b3795a7f21e67181dc0f}{Ship\+C\+A\+D\+::\+Viewport\+View}.



Definition at line 239 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!left\+Mouse\+Move@{left\+Mouse\+Move}}
\index{left\+Mouse\+Move@{left\+Mouse\+Move}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{left\+Mouse\+Move(\+Q\+Point cur, Q\+Point prev, int w, int h)}{leftMouseMove(QPoint cur, QPoint prev, int w, int h)}}]{\setlength{\rightskip}{0pt plus 5cm}bool Viewport\+View\+Perspective\+::left\+Mouse\+Move (
\begin{DoxyParamCaption}
\item[{Q\+Point}]{cur, }
\item[{Q\+Point}]{prev, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a11f5f04a95646a701743804c4d7c1d10}{}\label{classShipCAD_1_1ViewportViewPerspective_a11f5f04a95646a701743804c4d7c1d10}


Reimplemented from \hyperlink{classShipCAD_1_1ViewportView_a2dc46f8d032d707308cf853c70bc965a}{Ship\+C\+A\+D\+::\+Viewport\+View}.



Definition at line 219 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!middle\+Mouse\+Move@{middle\+Mouse\+Move}}
\index{middle\+Mouse\+Move@{middle\+Mouse\+Move}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{middle\+Mouse\+Move(\+Q\+Point cur, Q\+Point prev, int w, int h)}{middleMouseMove(QPoint cur, QPoint prev, int w, int h)}}]{\setlength{\rightskip}{0pt plus 5cm}bool Viewport\+View\+Perspective\+::middle\+Mouse\+Move (
\begin{DoxyParamCaption}
\item[{Q\+Point}]{cur, }
\item[{Q\+Point}]{prev, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_a1de2fd402609b54c79c2d70390ba4a64}{}\label{classShipCAD_1_1ViewportViewPerspective_a1de2fd402609b54c79c2d70390ba4a64}


Reimplemented from \hyperlink{classShipCAD_1_1ViewportView_a44baf7aad8a3ba7ded04395a8765caf9}{Ship\+C\+A\+D\+::\+Viewport\+View}.



Definition at line 197 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!project\+To3D@{project\+To3D}}
\index{project\+To3D@{project\+To3D}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{project\+To3\+D(\+Q\+Point pos, int w, int h)}{projectTo3D(QPoint pos, int w, int h)}}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Vector2D Viewport\+View\+Perspective\+::project\+To3D (
\begin{DoxyParamCaption}
\item[{Q\+Point}]{pos, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_afc402aace76462bb3b0431cebba6a6a5}{}\label{classShipCAD_1_1ViewportViewPerspective_afc402aace76462bb3b0431cebba6a6a5}


convert screen coordinates to 2D world coordinates 


\begin{DoxyParams}{Parameters}
{\em pos} & screen position \\
\hline
{\em w} & width of viewport in pixels \\
\hline
{\em h} & height of viewport in pixels \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the world coordinates of screen position 
\end{DoxyReturn}


Implements \hyperlink{classShipCAD_1_1ViewportView_a2bc94791273d6134566a386f2a735e37}{Ship\+C\+A\+D\+::\+Viewport\+View}.



Definition at line 189 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!reset\+View@{reset\+View}}
\index{reset\+View@{reset\+View}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{reset\+View()}{resetView()}}]{\setlength{\rightskip}{0pt plus 5cm}void Viewport\+View\+Perspective\+::reset\+View (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_ab3cc69a6cdb3271cc9e79ec16aa37a33}{}\label{classShipCAD_1_1ViewportViewPerspective_ab3cc69a6cdb3271cc9e79ec16aa37a33}


Reimplemented from \hyperlink{classShipCAD_1_1ViewportView_ab70e778772325a67610d983f630c2c3d}{Ship\+C\+A\+D\+::\+Viewport\+View}.



Definition at line 181 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!set\+Angle@{set\+Angle}}
\index{set\+Angle@{set\+Angle}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{set\+Angle(float val)}{setAngle(float val)}}]{\setlength{\rightskip}{0pt plus 5cm}void Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::set\+Angle (
\begin{DoxyParamCaption}
\item[{float}]{val}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_ad6d853a15bc9015d43e4c052471f2cb1}{}\label{classShipCAD_1_1ViewportViewPerspective_ad6d853a15bc9015d43e4c052471f2cb1}


Definition at line 156 of file viewportview.\+h.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!set\+Camera\+Type@{set\+Camera\+Type}}
\index{set\+Camera\+Type@{set\+Camera\+Type}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{set\+Camera\+Type(camera\+\_\+type\+\_\+t val)}{setCameraType(camera_type_t val)}}]{\setlength{\rightskip}{0pt plus 5cm}void Viewport\+View\+Perspective\+::set\+Camera\+Type (
\begin{DoxyParamCaption}
\item[{{\bf camera\+\_\+type\+\_\+t}}]{val}
\end{DoxyParamCaption}
)}\hypertarget{classShipCAD_1_1ViewportViewPerspective_ab1a56bd7cb986e2c3163bcacd201d32d}{}\label{classShipCAD_1_1ViewportViewPerspective_ab1a56bd7cb986e2c3163bcacd201d32d}


Definition at line 317 of file viewportview.\+cpp.

\index{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}!set\+Elevation@{set\+Elevation}}
\index{set\+Elevation@{set\+Elevation}!Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective@{Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective}}
\subsubsection[{\texorpdfstring{set\+Elevation(float val)}{setElevation(float val)}}]{\setlength{\rightskip}{0pt plus 5cm}void Ship\+C\+A\+D\+::\+Viewport\+View\+Perspective\+::set\+Elevation (
\begin{DoxyParamCaption}
\item[{float}]{val}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{classShipCAD_1_1ViewportViewPerspective_ad09e4532f81905f9ea90545b0b6d4856}{}\label{classShipCAD_1_1ViewportViewPerspective_ad09e4532f81905f9ea90545b0b6d4856}


Definition at line 160 of file viewportview.\+h.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Ship\+C\+A\+Dlib/\hyperlink{viewportview_8h}{viewportview.\+h}\item 
Ship\+C\+A\+Dlib/\hyperlink{viewportview_8cpp}{viewportview.\+cpp}\end{DoxyCompactItemize}
